﻿CREATE PROCEDURE [ServiceEngine].[ListAssertionTypesBySchemaObject]
@SchemaObjectID UNIQUEIDENTIFIER
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	DISTINCT N.[EntityID] as PolicyID, N.[EntityName] as [Name]
	FROM	[ServiceEngine].Names N
	INNER JOIN [ServiceEngine].AssertionTypes AST ON AST.AssertionTypeID = N.[EntityID]
	WHERE	N.[EntityTypeID] = 18 AND AST.SchemaObjectID = @SchemaObjectID
END